#ifndef LAURIN_WINDOW_H_
#define LAURIN_WINDOW_H_

#include "laurin-controller.h"
#include <gtkmm/window.h>
#include <gtkmm/progressbar.h>
#include <gtkmm/builder.h>
#include <gtkmm/uimanager.h>
#include <gtkmm/main.h>

class LaurinWindow
{
	public:

		~LaurinWindow();

		bool initialize(int argc, char** argv);
		void run();


	private:

		void setActions();
		void setStatus(const Glib::ustring& status);
		void removeLastStatus();
		void setOperationComplete();
		void setMenuForRunningStatus(bool running);
		void setProgressBarStatus(bool running);

		//events
		void on_action_file_run();
		void on_action_file_stop();
		void on_action_file_exit();
		void on_action_view_devices();
		void on_action_view_network();
		void on_action_edit_preferences();
		void on_action_help_about();
		void on_about_dialog_response(int response);
		void on_edit_preferences_response(int response);
		void on_edit_preferences_enable_network_discover();
		void on_edit_preferences_enable_devices_discover();
		void on_edit_preferences_enable_location();
		void on_edit_preferences_change_network_timeout();
		void on_edit_preferences_change_max_frame();
		void on_edit_preferences_change_virtual_device_name();
		void on_edit_preferences_change_network_device();
		void on_edit_preferences_change_master_device();
		bool on_progress_timeout();


		Gtk::Window* _app;
		Gtk::Main* _kit;
		Gtk::ProgressBar* _progress_bar;
		sigc::connection _timeout_connection;
		Glib::RefPtr<Gtk::Builder> _builder;
		Glib::RefPtr<Gtk::UIManager> _ui_manager;

		Laurin80211NetworksModel _devices_model;
		LaurinController _controller;
		LaurinControllerOptions _temp_options;


};

#endif
